﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TransportTables.aspx.cs" Inherits="Transport_TransportTables" MasterPageFile="~/MasterPages/MasterPage.master" Title="Транспортна Таблица"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div><br/>
        <table class="style1">
            <tr>
                <td style="background-color: #C0C0C0">
                    ТРАНСПОРТНА ТАБЛИЦА</td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="gvTransportTables" runat="server" 
                        BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                        CellPadding="4" 
                        DataSourceID="sdsTransportTables" ForeColor="Black" GridLines="Vertical" 
                        AutoGenerateColumns="False" DataKeyNames="TransportTableID" 
                        Font-Size="Small">
                        <FooterStyle BackColor="#CCCC99" />
                        <RowStyle BackColor="#F7F7DE" />
                        <Columns>
                            <asp:CommandField CancelText="Прекъсни" DeleteText="Изтриване" 
                                EditText="Редактиране" ShowDeleteButton="True" ShowEditButton="True" 
                                UpdateText="Обнови" />
                            <asp:BoundField DataField="PickedUp" HeaderText="Товарене От" 
                                SortExpression="PickedUp" />
                            <asp:BoundField DataField="Destination" HeaderText="Дестинация" 
                                SortExpression="Destination" />
                            <asp:BoundField DataField="Type" HeaderText="Вид Изделие" SortExpression="Type" />
                            <asp:BoundField DataField="Size" HeaderText="Размери палет мм/ШхДхВ" SortExpression="Size" />
                            <asp:BoundField DataField="Weigh" HeaderText="Тегло на 1 палет" SortExpression="Weigh" />
                            <asp:BoundField DataField="Pallet1" HeaderText="1 палет" 
                                SortExpression="Pallet1" />
                            <asp:BoundField DataField="Pallet2" HeaderText="2 палета" 
                                SortExpression="Pallet2" />
                            <asp:BoundField DataField="Pallet3" HeaderText="3 палета" 
                                SortExpression="Pallet3" />
                            <asp:BoundField DataField="Pallet4" HeaderText="4 палета" 
                                SortExpression="Pallet4" />
                            <asp:BoundField DataField="Pallet5" HeaderText="5 палета" 
                                SortExpression="Pallet5" />
                            <asp:BoundField DataField="Pallet6" HeaderText="6 палета" 
                                SortExpression="Pallet6" />
                            <asp:BoundField DataField="Pallet7" HeaderText="7 палета" 
                                SortExpression="Pallet7" />
                            <asp:BoundField DataField="Pallet8" HeaderText="8 палета" 
                                SortExpression="Pallet8" />
                            <asp:BoundField DataField="Pallet9" HeaderText="9 палета" 
                                SortExpression="Pallet9" />
                            <asp:BoundField DataField="Pallet10" HeaderText="10 палета" 
                                SortExpression="Pallet10" />
                            <asp:BoundField DataField="Pallet11" HeaderText="11 палета" 
                                SortExpression="Pallet11" />
                            <asp:BoundField DataField="Pallet12" HeaderText="12 палета" 
                                SortExpression="Pallet12" />
                            <asp:BoundField DataField="Pallet13" HeaderText="13 палета" 
                                SortExpression="Pallet13" />
                            <asp:BoundField DataField="Pallet14" HeaderText="14 палета" 
                                SortExpression="Pallet14" />
                            <asp:BoundField DataField="Pallet15" HeaderText="15 палета" 
                                SortExpression="Pallet15" />
                            <asp:BoundField DataField="Pallet16" HeaderText="16 палета" 
                                SortExpression="Pallet16" />
                            <asp:BoundField DataField="Pallet17" HeaderText="17 палета" 
                                SortExpression="Pallet17" />
                            <asp:BoundField DataField="Pallet18" HeaderText="18 палета" 
                                SortExpression="Pallet18" />
                            <asp:BoundField DataField="Pallet19" HeaderText="19 палета" 
                                SortExpression="Pallet19" />
                            <asp:BoundField DataField="Pallet20" HeaderText="20 палета" 
                                SortExpression="Pallet20" />
                            <asp:BoundField DataField="Pallet21" HeaderText="21 палета" 
                                SortExpression="Pallet21" />
                            <asp:BoundField DataField="Pallet22" HeaderText="22 палета" 
                                SortExpression="Pallet22" />
                            <asp:BoundField DataField="Pallet23" HeaderText="23 палета" 
                                SortExpression="Pallet23" />
                            <asp:BoundField DataField="Pallet24" HeaderText="24 палета" 
                                SortExpression="Pallet24" />
                            <asp:BoundField DataField="MorePallets" HeaderText="Пълен" 
                                SortExpression="MorePallets" />
                            <asp:BoundField DataField="Henger" HeaderText="Хенгер" 
                                SortExpression="Henger" />
                        </Columns>
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
       </div>
        <br />
        <asp:SqlDataSource ID="sdsTransportTables" runat="server" 
            ConnectionString="<%$ ConnectionStrings:KonturConnectionString %>" 
            DeleteCommand="DELETE FROM [TransportTables] WHERE [TransportTableID] = @TransportTableID" 
            InsertCommand="INSERT INTO [TransportTables] ([TransporterID], [PickedUp], [Destination], [Type], [Size], [Weigh], [Pallet1], [Pallet2], [Pallet3], [Pallet4], [Pallet5], [Pallet6], [Pallet7], [Pallet8], [Pallet9], [Pallet10], [Pallet11], [Pallet12], [Pallet13], [Pallet14], [Pallet15], [Pallet16], [Pallet17], [Pallet18], [Pallet19], [Pallet20], [Pallet21], [Pallet22], [Pallet23], [Pallet24], [MorePallets], [Henger]) VALUES (@TransporterID, @PickedUp, @Destination, @Type, @Size, @Weigh, @Pallet1, @Pallet2, @Pallet3, @Pallet4, @Pallet5, @Pallet6, @Pallet7, @Pallet8, @Pallet9, @Pallet10, @Pallet11, @Pallet12, @Pallet13, @Pallet14, @Pallet15, @Pallet16, @Pallet17, @Pallet18, @Pallet19, @Pallet20, @Pallet21, @Pallet22, @Pallet23, @Pallet24, @MorePallets, @Henger)" 
            SelectCommand="SELECT [TransportTableID], [TransporterID], [PickedUp], [Destination], [Type], [Size], [Weigh], [Pallet1], [Pallet2], [Pallet3], [Pallet4], [Pallet5], [Pallet6], [Pallet7], [Pallet8], [Pallet9], [Pallet10], [Pallet11], [Pallet12], [Pallet13], [Pallet14], [Pallet15], [Pallet16], [Pallet17], [Pallet18], [Pallet19], [Pallet20], [Pallet21], [Pallet22], [Pallet23], [Pallet24], [MorePallets], [Henger] FROM [TransportTables] Where [TransporterID] = @TransporterID" 
            UpdateCommand="UPDATE [TransportTables] SET [PickedUp] = @PickedUp, [Destination] = @Destination, [Type] = @Type, [Size] = @Size, [Weigh] = @Weigh, [Pallet1] = @Pallet1, [Pallet2] = @Pallet2, [Pallet3] = @Pallet3, [Pallet4] = @Pallet4, [Pallet5] = @Pallet5, [Pallet6] = @Pallet6, [Pallet7] = @Pallet7, [Pallet8] = @Pallet8, [Pallet9] = @Pallet9, [Pallet10] = @Pallet10, [Pallet11] = @Pallet11, [Pallet12] = @Pallet12, [Pallet13] = @Pallet13, [Pallet14] = @Pallet14, [Pallet15] = @Pallet15, [Pallet16] = @Pallet16, [Pallet17] = @Pallet17, [Pallet18] = @Pallet18, [Pallet19] = @Pallet19, [Pallet20] = @Pallet20, [Pallet21] = @Pallet21, [Pallet22] = @Pallet22, [Pallet23] = @Pallet23, [Pallet24] = @Pallet24, [MorePallets] = @MorePallets, [Henger] = @Henger WHERE [TransportTableID] = @TransportTableID">
            <SelectParameters>
                <asp:QueryStringParameter Name="TransporterID" 
                    QueryStringField="TransporterID" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="TransportTableID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="PickedUp" Type="String" />
                <asp:Parameter Name="Destination" Type="String" />
                <asp:Parameter Name="Type" Type="String" />
                <asp:Parameter Name="Size" Type="String" />
                <asp:Parameter Name="Weigh" Type="String" />
                <asp:Parameter Name="Pallet1" Type="String" />
                <asp:Parameter Name="Pallet2" Type="String" />
                <asp:Parameter Name="Pallet3" Type="String" />
                <asp:Parameter Name="Pallet4" Type="String" />
                <asp:Parameter Name="Pallet5" Type="String" />
                <asp:Parameter Name="Pallet6" Type="String" />
                <asp:Parameter Name="Pallet7" Type="String" />
                <asp:Parameter Name="Pallet8" Type="String" />
                <asp:Parameter Name="Pallet9" Type="String" />
                <asp:Parameter Name="Pallet10" Type="String" />
                <asp:Parameter Name="Pallet11" Type="String" />
                <asp:Parameter Name="Pallet12" Type="String" />
                <asp:Parameter Name="Pallet13" Type="String" />
                <asp:Parameter Name="Pallet14" Type="String" />
                <asp:Parameter Name="Pallet15" Type="String" />
                <asp:Parameter Name="Pallet16" Type="String" />
                <asp:Parameter Name="Pallet17" Type="String" />
                <asp:Parameter Name="Pallet18" Type="String" />
                <asp:Parameter Name="Pallet19" Type="String" />
                <asp:Parameter Name="Pallet20" Type="String" />
                <asp:Parameter Name="Pallet21" Type="String" />
                <asp:Parameter Name="Pallet22" Type="String" />
                <asp:Parameter Name="Pallet23" Type="String" />
                <asp:Parameter Name="Pallet24" Type="String" />
                <asp:Parameter Name="MorePallets" Type="String" />
                <asp:Parameter Name="Henger" Type="String" />
                <asp:Parameter Name="TransportTableID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:QueryStringParameter Name="TransporterID" QueryStringField="TransporterID" />
                <asp:Parameter Name="PickedUp" Type="String" />
                <asp:Parameter Name="Destination" Type="String" />
                <asp:Parameter Name="Type" Type="String" />
                <asp:Parameter Name="Size" Type="String" />
                <asp:Parameter Name="Weigh" Type="String" />
                <asp:Parameter Name="Pallet1" Type="String" />
                <asp:Parameter Name="Pallet2" Type="String" />
                <asp:Parameter Name="Pallet3" Type="String" />
                <asp:Parameter Name="Pallet4" Type="String" />
                <asp:Parameter Name="Pallet5" Type="String" />
                <asp:Parameter Name="Pallet6" Type="String" />
                <asp:Parameter Name="Pallet7" Type="String" />
                <asp:Parameter Name="Pallet8" Type="String" />
                <asp:Parameter Name="Pallet9" Type="String" />
                <asp:Parameter Name="Pallet10" Type="String" />
                <asp:Parameter Name="Pallet11" Type="String" />
                <asp:Parameter Name="Pallet12" Type="String" />
                <asp:Parameter Name="Pallet13" Type="String" />
                <asp:Parameter Name="Pallet14" Type="String" />
                <asp:Parameter Name="Pallet15" Type="String" />
                <asp:Parameter Name="Pallet16" Type="String" />
                <asp:Parameter Name="Pallet17" Type="String" />
                <asp:Parameter Name="Pallet18" Type="String" />
                <asp:Parameter Name="Pallet19" Type="String" />
                <asp:Parameter Name="Pallet20" Type="String" />
                <asp:Parameter Name="Pallet21" Type="String" />
                <asp:Parameter Name="Pallet22" Type="String" />
                <asp:Parameter Name="Pallet23" Type="String" />
                <asp:Parameter Name="Pallet24" Type="String" />
                <asp:Parameter Name="MorePallets" Type="String" />
                <asp:Parameter Name="Henger" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    <asp:DetailsView ID="dvInsert" runat="server" Height="16px" Width="427px" 
            DataSourceID="sdsTransportTables" DefaultMode="Insert" AutoGenerateRows="False" 
            BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4" DataKeyNames="TransportTableID" ForeColor="Black" 
            GridLines="Vertical" style="margin-right: 275px" 
            HeaderText="Добавяне на нов запис">
        <FooterStyle BackColor="#CCCC99" />
        <RowStyle BackColor="#F7F7DE" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <Fields>
               <asp:BoundField DataField="PickedUp" HeaderText="Товарене От" 
                                SortExpression="PickedUp" />
                            <asp:BoundField DataField="Destination" HeaderText="Дестинация" 
                                SortExpression="Destination" />
                            <asp:BoundField DataField="Type" HeaderText="Вид Изделие" SortExpression="Type" />
                            <asp:BoundField DataField="Size" HeaderText="Размери палет мм/ШхДхВ" SortExpression="Size" />
                            <asp:BoundField DataField="Weigh" HeaderText="Тегло на 1 палет" SortExpression="Weigh" />
                            <asp:BoundField DataField="Pallet1" HeaderText="1 палет" 
                                SortExpression="Pallet1" />
                            <asp:BoundField DataField="Pallet2" HeaderText="2 палета" 
                                SortExpression="Pallet2" />
                            <asp:BoundField DataField="Pallet3" HeaderText="3 палета" 
                                SortExpression="Pallet3" />
                            <asp:BoundField DataField="Pallet4" HeaderText="4 палета" 
                                SortExpression="Pallet4" />
                            <asp:BoundField DataField="Pallet5" HeaderText="5 палета" 
                                SortExpression="Pallet5" />
                            <asp:BoundField DataField="Pallet6" HeaderText="6 палета" 
                                SortExpression="Pallet6" />
                            <asp:BoundField DataField="Pallet7" HeaderText="7 палета" 
                                SortExpression="Pallet7" />
                            <asp:BoundField DataField="Pallet8" HeaderText="8 палета" 
                                SortExpression="Pallet8" />
                            <asp:BoundField DataField="Pallet9" HeaderText="9 палета" 
                                SortExpression="Pallet9" />
                            <asp:BoundField DataField="Pallet10" HeaderText="10 палета" 
                                SortExpression="Pallet10" />
                            <asp:BoundField DataField="Pallet11" HeaderText="11 палета" 
                                SortExpression="Pallet11" />
                            <asp:BoundField DataField="Pallet12" HeaderText="12 палета" 
                                SortExpression="Pallet12" />
                            <asp:BoundField DataField="Pallet13" HeaderText="13 палета" 
                                SortExpression="Pallet13" />
                            <asp:BoundField DataField="Pallet14" HeaderText="14 палета" 
                                SortExpression="Pallet14" />
                            <asp:BoundField DataField="Pallet15" HeaderText="15 палета" 
                                SortExpression="Pallet15" />
                            <asp:BoundField DataField="Pallet16" HeaderText="16 палета" 
                                SortExpression="Pallet16" />
                            <asp:BoundField DataField="Pallet17" HeaderText="17 палета" 
                                SortExpression="Pallet17" />
                            <asp:BoundField DataField="Pallet18" HeaderText="18 палета" 
                                SortExpression="Pallet18" />
                            <asp:BoundField DataField="Pallet19" HeaderText="19 палета" 
                                SortExpression="Pallet19" />
                            <asp:BoundField DataField="Pallet20" HeaderText="20 палета" 
                                SortExpression="Pallet20" />
                            <asp:BoundField DataField="Pallet21" HeaderText="21 палета" 
                                SortExpression="Pallet21" />
                            <asp:BoundField DataField="Pallet22" HeaderText="22 палета" 
                                SortExpression="Pallet22" />
                            <asp:BoundField DataField="Pallet23" HeaderText="23 палета" 
                                SortExpression="Pallet23" />
                            <asp:BoundField DataField="Pallet24" HeaderText="24 палета" 
                                SortExpression="Pallet24" />
                            <asp:BoundField DataField="MorePallets" HeaderText="Пълен" 
                                SortExpression="MorePallets" />
                            <asp:BoundField DataField="Henger" HeaderText="Хенгер" 
                                SortExpression="Henger" />
            <asp:CommandField ShowInsertButton="True" CancelText="Прекъсни" 
                   InsertText="Добави" UpdateText="Обнови" />
        </Fields>
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:DetailsView>
        <br />
        <br />
</asp:Content>